// 经销商相关API
// GET 请求 - 参数必须放在 params 对象中
// POST 请求 - 参数必须放在 data 对象中
const http = uni.$u.http;

// 获取经销商线上店铺信息
export function GetAgentShopInfo(params) {
	return http.get('/api/App_Agent/GetAgentShopInfo', {
		params: params
	})
}

// 获取经销商首页统计数据
export function GetAgentShopExInfo(params) {
	return http.get('/api/App_Agent/GetAgentShopExInfo', {
		params: params
	})
}

// 线下门店列表（分页）
export function GetUnlineStoreList(params) {
	return http.get('/api/App_Agent/GetUnlineStoreList', {
		params: params
	})
}
// 线下门店详情
export function GetUnlineStoreInfo(params) {
	return http.get('/api/App_Agent/GetUnlineStoreInfo', {
		params: params
	})
}
// 添加/修改小店
export function SaveShopStore(data) {
	return http.post('/api/App_Agent/SaveShopStore', data)
}
// 删除小店
export function DelShopStore(data) {
	return http.post('/api/App_Agent/DelShopStore', data)
}

// 获取经销商商品统计
export function GetAgentProductTJ(params) {
	return http.get('/api/App_Agent/GetAgentProductTJ', {
		params: params
	})
}
// 获取经销商商品列表
export function GetAgentProductList(params) {
	return http.get('/api/App_Agent/GetAgentProductList', {
		params: params
	})
}
// 上架/下架商品
export function SettingProduct(data) {
	return http.post('/api/App_Agent/SettingProduct', data)
}
// 修改商品库存
export function SaveProductStock(data) {
	return http.post('/api/App_Agent/SaveProductStock', data)
}

// 经销商商品排行榜
export function ProductSaleRanking(params) {
	return http.get('/api/App_Agent/ProductSaleRanking', {
		params: params
	})
}
// 经销商销量统计
export function AgentSaleStatistics(params) {
	return http.get('/api/App_Agent/AgentSaleStatistics', {
		params: params
	})
}

// 商品分类列表（全部）
export function GetProductGroupAll(params) {
	return http.get('/api/App_Agent/GetProductGroupAll', {
		params: params
	})
}
// 商品分类列表（分页）
export function GetProductGroupList(params) {
	return http.get('/api/App_Agent/GetProductGroupList', {
		params: params
	})
}
// 商品分类详情
export function GetProductGroupInfo(params) {
	return http.get('/api/App_Agent/GetProductGroupInfo', {
		params: params
	})
}
// 添加/修改商品分类
export function SaveProductGroup(data) {
	return http.post('/api/App_Agent/SaveProductGroup', data)
}
// 删除商品分类
export function DelProductGroup(data) {
	return http.post('/api/App_Agent/DelProductGroup', data)
}
// 启用/禁用商品分类
export function SetProductGroup(data) {
	return http.post('/api/App_Agent/SetProductGroup', data)
}

// 获取经销商订单统计
export function GetAgentOrderTJ(params) {
	return http.get('/api/App_Agent/GetAgentOrderTJ', {
		params: params
	})
}
// 获取经销商订核销统计
export function GetAgentPickupTJ(params) {
	return http.get('/api/App_Agent/GetAgentPickupTJ', {
		params: params
	})
}
// 获取经销商订单列表
export function GetAgentOrderList(params) {
	return http.get('/api/App_Agent/GetAgentOrderList', {
		params: params
	})
}
// 获取经销商核销列表
export function GetAgentPickupList(params) {
	return http.get('/api/App_Agent/GetAgentPickupList', {
		params: params
	})
}
// 获取经销商订单详情
export function GetAgentOrderInfo(params) {
	return http.get('/api/App_Agent/GetAgentOrderInfo', {
		params: params
	})
}
// 订单发货
export function DeliveryOrders(data) {
	return http.post('/api/App_Agent/DeliveryOrders', data)
}
// 确认核销
export function PickupOrders(data) {
	return http.post('/api/App_Agent/PickupOrders', data)
}
// 拉入黑名单
export function SetBlackList(data) {
	return http.post('/api/App_Agent/SetBlackList', data)
}

// 获取经销商售后统计
export function GetAfterSalesTJ(params) {
	return http.get('/api/App_Agent/GetAfterSalesTJ', {
		params: params
	})
}
// 获取经销商售后列表
export function GetAfterSalesList(params) {
	return http.get('/api/App_Agent/GetAfterSalesList', {
		params: params
	})
}
// 订单售后审核：同意/拒绝
export function AfterSalesCheck(data) {
	return http.post('/api/App_Agent/AfterSalesCheck', data)
}
// 订单售后签收确认
export function AfterSalesReceive(data) {
	return http.post('/api/App_Agent/AfterSalesReceive', data)
}
// 订单售后退款确认
export function AfterSalesRefund(data) {
	return http.post('/api/App_Agent/AfterSalesRefund', data)
}